Skip to content

Fix for Variable defined multiple times#42

Merged
RobertBlackhart merged 1 commit into
mainfrom
finding-autofix-34353c59
Apr 14, 2026
Merged

Fix for Variable defined multiple times#42
RobertBlackhart merged 1 commit into
mainfrom
finding-autofix-34353c59

Conversation

@RobertBlackhart
Copy link
Copy Markdown
Collaborator

The general fix is to remove assignments that are overwritten before use, keeping only the assignment that is actually consumed.

Best fix here: in recline/arg_types/ranged_int.py, inside nested class _RangedInt in RangedInt.define, delete the initial metavar = '<int>' assignment and keep the final computed assignment metavar = f'<int{range_str}>'. This preserves runtime behavior exactly because the second assignment is unconditional and already determines the final class attribute value.

No imports, new methods, or new definitions are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@RobertBlackhart RobertBlackhart marked this pull request as ready for review April 14, 2026 23:11
@RobertBlackhart RobertBlackhart merged commit e035598 into main Apr 14, 2026
7 checks passed
@RobertBlackhart RobertBlackhart deleted the finding-autofix-34353c59 branch May 11, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant